<?php
	require_once(realpath(dirname(__FILE__)) . "/Baseobj.class.php");

	class Modulesdesc extends Baseobj{

		var $id;
		var $plugin;
		var $lang;
		var $titre;
		var $chapo;
		var $description;
		var $devise;

		const TABLE="modulesdesc";
		var $table=self::TABLE;

		var $bddvars = array("id", "plugin", "lang", "titre", "chapo", "description", "devise");

		function __construct($plugin = "", $lang = 1){
			parent::__construct();

			if($plugin != "")
 			  $this->charger($plugin, $lang);
		}


		function charger($plugin, $lang=1){
			$res = $this->getVars("select * from $this->table where plugin=\"$plugin\" and lang=\"$lang\"");
			if(! $res)
				return $this->getVars("select * from $this->table where plugin=\"$plugin\" and lang=\"1\"");
			else return $res;

		}

		function verif($plugin, $lang=1){
			return $this->getVars("select * from $this->table where plugin=\"$plugin\" and lang=\"$lang\"");
		}

	}

?>